﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SIAKADCORE.Models
{
    /// <summary>
    /// Kelas Rekomendasi [dbo].[rekomendasi]
    /// </summary>
    /// <summary>
    /// Kelas Rekomendasi [dbo].[rekomendasi]
    /// </summary>
    public class Rekomendasi
    {
        #region Constants
        /// <summary>
        /// Konstanta panjang id dari primary key
        /// </summary>
        public const int IdLength = 10;
        /// <summary>
        /// Konstanta prefix dari primary key
        /// </summary>
        public const string IdPrefix = "R";
        /// <summary>
        /// Konstanta nama tabel pada database
        /// </summary>
        public const string TableName = "[dbo].[rekomendasi]";
        /// <summary>
        /// Konstanta nama kolom idRekomendasi pada tabel
        /// </summary>
        public const string ColumnNameIdRekomendasi = "[id_rekomendasi]";
        /// <summary>
        /// Konstanta nama kolom isiRekomendasi pada tabel
        /// </summary>
        public const string ColumnNameIsiRekomendasi = "[rekomendasi]";
        public const string ColumnNameIdPertanyaan = "[id_pertanyaan]";
        #endregion

        #region Fields

        private string idRekomendasi;
        private string isiRekomendasi;
        private string idPertanyaan;
        #endregion

        #region Properties
        /// <summary>
        /// [id_rekomendasi] CHAR(20) PRIMARY KEY
        /// </summary>
        public string IdRekomendasi
        {
            get { return this.idRekomendasi; }
            set { this.idRekomendasi = value; }
        }

        /// <summary>
        /// [rekomendasi] TEXT NOT NULL
        /// </summary>
        public string IsiRekomendasi
        {
            get { return this.isiRekomendasi; }
            set { this.isiRekomendasi = value; }
        }
        public string IdPertanyaan
        {
            get { return this.idPertanyaan; }
            set { this.idPertanyaan = value; }
        }

        #endregion

        #region Constructors
        /// <summary>
        /// Konstruktor
        /// </summary>
        public Rekomendasi()
        {

        }

        /// <summary>
        /// Konstruktor
        /// </summary>
        /// <param name="idRekomendasi">[id_rekomendasi] CHAR(20) PRIMARY KEY</param>
        /// <param name="isiRekomendasi">[rekomendasi] TEXT NOT NULL</param>
        public Rekomendasi(string idRekomendasi, string isiRekomendasi, string idDetailPertanyaan)
        {
            this.idRekomendasi = idRekomendasi;
            this.isiRekomendasi = isiRekomendasi;
            this.idPertanyaan = idDetailPertanyaan;
        }
        #endregion

        public override string ToString()
        {
            return string.Format("ID_REKOMENDASI: {0} | REKOMENDASI: {1} | ID_PERTANYAAN: {2}", this.idRekomendasi, this.isiRekomendasi, this.idPertanyaan);
        }
    }
}
